Release 10.1A: OpenEdge Development:
Progress 4GL Handbook


Creating a dynamic browse

The most complex graphical object is the browse object. You can create a browse dynamically and specify programmatically all its attributes, including what table and query’s records are displayed, what columns it displays, which columns are enabled for input, and its visible attributes such as size and position.

You can assign most of a dynamic browse’s attributes in the CREATE BROWSE statement:

CREATE BROWSE browse-handle ASSIGN attribute = value . . . 

In addition, you can specify some attribute values individually following the CREATE statement:

browse-handle:attribute = value 

Here are some of the principal attributes you can set either in the CREATE BROWSE statement or in a separate assignment on the browse handle:

Some attributes can only be assigned before the browse is realized. In the case of a dynamic browse, this is generally when the browse is made visible, which you can do in one of two ways:

In a CREATE BROWSE statement, the attributes of the browse in the ASSIGN list are assigned in sequence. So, as this single statement is executed, if Progress encounters the VISIBLE = TRUE or HIDDEN = FALSE phrases (and its parent frame is visible), the browse is realized at that time. If you try to assign an attribute later in the statement, or in a separate statement, which has to be assigned before the browse is realized, you get an error at run time. For example, if you don’t want the browse to have row markers at the beginning of each row, you set the ROW-MARKERS attribute to FALSE. If you put this assignment into the CREATE statement after an attribute that realizes the browse, you get the error shown in Figure 18–15.

Figure 18–15: ROW-MARKERS error message

If this occurs, you have to reorder the assignments in the CREATE BROWSE statement. Generally, you should put the assignment that realizes the browse at the end of the statement or in a separate attribute assignment statement.

In the same way, you can modify most attributes in separate statements after the browse has been realized, except for attributes such as ROW-MARKERS.

The one thing you cannot set within the CREATE BROWSE statement is the list of columns to display. There are three methods on the browse handle that set the column list after the browse has been created.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095